package cn.com.open.itembank.service;

import cn.com.open.itembank.dto.ReturnModel;
import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.Map;

/**
 * Created by lucky on 2018/1/31.
 */
@FeignClient(name = "item-item-service")
public interface ItemBankQuestionRemoteService {
    /**
     * 共享试题.
     *
     * @param sourceItemBankId 源题库id
     * @param targetItemBankID the target item bank id
     * @param appID            the app id
     * @param orgID            the org id
     * @param chapterRelation  旧新章节对照map
     * @return the return model
     */
    @PutMapping(value = "/itembank/{itemBankId}/question/share")
    ReturnModel shareQuestion(@PathVariable(value = "itemBankId") String sourceItemBankId,
                                     @RequestParam(value = "targetItemBankID") String targetItemBankID,
                                     @RequestParam(value = "appID") String appID, @RequestParam(value = "orgID") String orgID,
                                     @RequestBody Map<String, String> chapterRelation);
}
